package com.yu.waterstation.app;


import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SpringBootApplication(scanBasePackages = {"com.yu.waterstation.common", "com.yu.waterstation.app"})
@MapperScan("com.yu.**.mapper")
@RestController
public class WaterStationApp {
    public static void main(String[] args) {
        SpringApplication.run(WaterStationApp.class, args);
    }

    @GetMapping("/ping")
    public String run() {
        return "服务器正常运行"; // tests 1
    }

    @GetMapping("/404")
    public String notFound() {
        return "未找到对应的资源";
    }
}
